Skip to content

Typescript module API#3327

Merged
cloutiertyler merged 60 commits into
masterfrom
noa/ts-module-api
Oct 16, 2025
Merged

Typescript module API#3327
cloutiertyler merged 60 commits into
masterfrom
noa/ts-module-api

Conversation

@coolreader18

@coolreader18 coolreader18 commented Oct 1, 2025

Copy link
Copy Markdown
Contributor

Description of Changes

Currently based on #3361

Implements most of the TS module API (not yet a function for type aliases).

Expected complexity level and risk

Testing

  • Extremely basic module stuff works

@coolreader18 coolreader18 force-pushed the noa/ts-module-api branch 3 times, most recently from 0b4dac9 to ec79ad5 Compare October 1, 2025 21:54
@Centril Centril changed the base branch from master to centril/v8-syscalls October 2, 2025 16:00
@Centril Centril force-pushed the centril/v8-syscalls branch 22 times, most recently from ff1fe7b to a9e52b4 Compare October 3, 2025 12:46
coolreader18 and others added 8 commits October 15, 2025 16:17
Co-authored-by: Tyler Cloutier <cloutiertyler@users.noreply.github.com>
Signed-off-by: Noa <coolreader18@gmail.com>
Co-authored-by: Tyler Cloutier <cloutiertyler@users.noreply.github.com>
Signed-off-by: Noa <coolreader18@gmail.com>
Comment thread crates/cli/src/subcommands/project/typescript/package._json
@drogus drogus mentioned this pull request Oct 16, 2025
@cloutiertyler cloutiertyler added this pull request to the merge queue Oct 16, 2025
Merged via the queue into master with commit bb43213 Oct 16, 2025
25 of 27 checks passed
joshua-spacetime pushed a commit that referenced this pull request Oct 16, 2025
# Description of Changes

Host-side changes extracted from #3327 

I added AUTO_INC_OVERFLOW even though we don't currently ever return it,
in order to future-proof so it's already there when we start emitting
it.

Prepublish was failing because it was expecting a wasm module
unconditionally, so now it takes ?host_type.

I tweaked JS deser to accept null/undefined when the unit type or an
option type is expected.

I switched to bsatn, because the native sats->js translator wasn't
matching what js was expecting.

I renamed the sys module: my thinking is that `spacetime:` as a scheme
will help disambiguate it, and maybe it could also be used for IMC in
the future or something? And I believe we had discussed wanting this to
be versioned, similar to wasm imports.

Trying to get a borrowed str from deserialize_js doesn't work, because
v8 strings don't store utf8.

# Testing

<!-- Describe any testing you've done, and any testing you'd like your
reviewers to do,
so that you're confident that all the changes work as expected! -->

- [x] All this was done in the course of getting an actual typescript
module to successfully publish.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add TypeScript quickstart-chat module to modules/quickstart-chat-ts

5 participants